package lt.mockos.app.client.cpu.hw.type;

import java.util.Arrays;
import java.util.LinkedList;

public class Registers {

    public enum REG {
        CS, DS, SS, CP, SP, AR, BR, SF, PTR, SI, PI, TI, TIME, MODE
    }

    public int CS, DS, SS, CP, SP, AR, BR, SF, PTR, SI, PI, TI, TIME, MODE;

    public Registers() {
        CS = DS = SS = CP = SP = AR = BR = SF = PTR = SI = PI = TI = TIME = MODE = 0;
    }

    public LinkedList<Integer> registerList() {
        return new LinkedList<Integer>(Arrays.asList(CS, DS, SS, CP, SP, AR, BR, SF, PTR, SI, PI, TI, TIME, MODE));
    }

    public void clean() {
        CS = DS = SS = CP = SP = AR = BR = SF = PTR = SI = PI = TI = TIME = MODE = 0;
    }

    public String toString() {
        return CS + "." + DS + "." + SS + "." + CP + "." + SP + "." + AR + "." + BR + "." + SF + "." + PTR + "." + SI + "." + PI + "." + TI + "." + TIME + "." + MODE;
    }
}
